#coding=utf-8
#LightCam 清理table
#init by hfh 20150225

import socket,os,time,re
import lc_libs
import multiprocessing,subprocess,traceback
import sys

db=lc_libs.lc_mongodb_operater('127.0.0.1',27017)

try:
	db.connect()
except Exception:
	excinfo=traceback.format_exc()
	print excinfo
	
Conn=db.getConn()
if Conn==None:
	print "Can not Connect to the MondbDB"
	exit(0)

dbname=sys.argv[1]
tablename=sys.argv[2]
dboper=db.useDatabase(dbname)
dboper.drop_collection(tablename)

db.close()
